pass image path in laravel blade

35

use Storage;
$url = "http://www.google.co.in/intl/en_com/images/srpr/logo1w.png";
$contents = file_get_contents($url);
$name = substr($url, strrpos($url, '/') + 1);
Storage::put($name, $contents);
<img src="{{ asset('images/foo.png') }}" alt="tag">

Comments

Submit
0 Comments